<%@page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<%
			String basepath = request.getContextPath();
		%>
		<link href="<%=basepath%>/css/main.css" rel="stylesheet"
			type="text/css" />
		<script language="javascript" type="text/javascript"
			src="<%=basepath%>/js/register.js"></script>
		<script language="javascript" type="text/javascript"
			src="<%=basepath%>/calendar/WdatePicker.js"></script>
		<script src="js/jquery-1.4.4.js" type="text/javascript"></script>
		<script language="JavaScript" type="text/javascript"
			src="<%=basepath%>/js/caltimer.js"></script>
		<script language="javascript" type="text/javascript"
			src="<%=basepath%>/js/common.js"></script>
		<script type="text/javascript">
			jQuery(document).ready(
				function(){
					//供应商类型
					initselect("suptype",'${currentInfo.suptype}');
					//企业性质
					initselect("entproperty",'${currentInfo.entproperty}');
					//初始化两个字段：所属行业，经济类型
					initmodel("industryname,ectypename","${currentInfo.industry}"+","+"${currentInfo.ectype}");
				}
			)
			
			//初始化参考数据的名称
			function initmodel(name,pk){
				jQuery.ajax(
						{
						type: "GET", 
			            async:false,
			            url:"<%=basepath%>/register/initmodel?pk="+pk, 
			            dataType:"text", 
			            success:function(result){   
			                if(result !='')
			                {
			                	var items = result.split("|");
			                	var nameitem = name.split(",");
			                	for(var i=0;i<nameitem.length;i++)
			                	{
			                		if(i<items.length)
			                		{
			                			document.getElementById(nameitem[i]).value = items[i];
			                		}
			                	}
			                }
			            } 
			        }
				)
			}
			
				function initList(id,code){
					var url = "iframe:<%=basepath%>/register/initlist?id="+id+"&code="+code;
					dialog("", url,"500", "400", "","");
				}
		</script>
		<style type="text/css">
.mycolor {
	color: #FF0000;
}
</style>
	</head>
	<body class="fullbody">
		<form action="<%=basepath%>/selfinfo/savesupinfo"
			method="post" onsubmit="return CheckSupInfo();">
				<div class="context">
					<div class="position">
						<div class="tposi">
							当前位置：
							<a href="javascript:changeMenu(1,'<%=request.getContextPath()%>/infopub/pubmain?menuid=1');" class="linkstyle">首页</a>&nbsp;&gt;&gt;&nbsp;
							<a href="javascript:changeMenu(4,'')" class="linkstyle">自助服务</a>&nbsp;&gt;&gt;&nbsp;
							<span class="curposition">企业信息维护</span>
						</div>
						<div class="help">
							<a href="javascript:void(null);" onclick="doHelp('<%=request.getContextPath()%>/help/html/QYXXXG.html');" class="linkstyle">帮助</a>
						</div>
					</div>
					<div class="margin8">
					</div>
					<div class="subpage_title">
						<div class="title_index">
							<img src="<%=basepath%>/images/common/dot03.gif" alt=""
								border="0" />
							&nbsp;企业信息维护
						</div>
						<div class="rollback">
							<a href="javascript:changeMenu(4,'')" class="linkstyle">&lt;&lt;&nbsp;返回自助服务</a>
						</div>
					</div>
					<div class="margin10">
					</div>
					<div class="orginfo">
						<div class="margin10">
						</div>
						<div class="margin10">
						</div>
						<div class="spliter_line">
						</div>
						<div class="margin10">
						</div>
						<div class="subpage_title_small">
							注：企业信息修改后需要提交采购方审核。
						</div>
						<div class="margin10">
						</div>
						<div class="lineconner1">
							<div class="left1">
								<img src="<%=basepath%>/images/conner/a_01.png" alt="" />
							</div>
							<div class="right1">
								<img src="<%=basepath%>/images/conner/b_01.png" alt="" />
							</div>
							<div class="c_context">
								<table cellpadding="0" cellspacing="0" border="0" width="700">
									<tr class="inputrow">
										<td class="w1">
											供应商名称：
										</td>
										<td class="w5">
											<input type="text" name="supname" class="textstyle"
												value="${currentInfo.supname}" />
											<span class="needfill">*</span>
											<input type="hidden" name="suprank" value="${currentInfo.suprank}" />
											<input type="hidden" name="supstatus" value="${currentInfo.supstatus}" />
										</td>
										<td class="w1">
											供应商简称：
										</td>
										<td class="w5">
											<input type="text" name="supsimname"
												value="${currentInfo.supsimname}" class="textstyle" />
										</td>
									</tr>
									<tr class="inputrow">
										<td class="w1">
											英文名称：
										</td>
										<td class="w5">
											<input type="text" name="supenname" class="textstyle"
												value="${currentInfo.supenname}" />
										</td>
										<td class="w1">
											所属行业：
										</td>
										<td class="w5">
											<input type="text" name="industryname" id="industryname" class="textstyle"
											 onclick="initList('industry','SYS005')" readOnly/>
												<input type="hidden" name="industry" id="industry" class="textstyle"
												value="${currentInfo.industry}" readOnly/>
										</td>
									</tr>
									<tr class="inputrow">
										<td class="w1">
											供应商类型：
										</td>
										<td class="w5">
											<select name="suptype" id="suptype" class="textstyle">
												<option value="0">
													外部单位
												</option>
												<option value="1">
													内部单位
												</option>
											</select>
											<span class="needfill">*</span>
										</td>

										<td class="w1">
											企业性质：
										</td>
										<td class="w5">
											<select name="entproperty" id="entproperty" class="textstyle">
												<option value="1">
													上市公司
												</option>
												<option value="2">
													非上市公司
												</option>

											</select>
											<span class="needfill">*</span>
										</td>
									</tr>
									<tr class="inputrow">
										<td class="w1">
											法人：
										</td>
										<td class="w5">
											<input type="text" name="legalbody"
												value="${currentInfo.legalbody}" class="textstyle" />
										</td>
										<td class="w1">
											注册资本：
										</td>
										<td class="w5">
											<input type="text" name="regfound"
												value="${currentInfo.regfound}" class="textstyle" />
										</td>
									</tr>
									<tr class="inputrow">
										<td class="w1">
											经济类型：
										</td>
										<td class="w5">
											<input type="text" name="ectypename" id="ectypename"
												 class="textstyle" onclick="initList('ectype','SYS004_0xx')" readOnly/>
											<input type="hidden" name="ectype" id="ectype"
												value="${currentInfo.ectype}" class="textstyle"  readOnly/>
										</td>
										<td class="w1">
											成立日期：
										</td>
										<td class="w5">
											<input type="text" style="width: 200" name="builddate"
												value="${currentInfo.builddate}" id="builddate"
												onclick="WdatePicker()" readOnly class="textstyle" />
										</td>
									</tr>
									<tr class="inputrow">
										<td class="w1">
											纳税人登记号：
										</td>
										<td class="w5">
											<input type="text" name="taxpayerid"
												value="${currentInfo.taxpayerid}" class="textstyle" />
											<span class="needfill">*</span>
										</td>
										<td class="w1">
											经营场所面积：
										</td>
										<td class="w5">
											<input type="text" name="bizarea"
												value="${currentInfo.bizarea}" class="textstyle" />
										</td>
									</tr>
									<tr class="inputrow">
										<td class="w1">
											营业执照号：
										</td>
										<td class="w5">
											<input type="text" name="salelicenceno"
												value="${currentInfo.salelicenceno}" class="textstyle" />
											<span class="needfill">*</span>
										</td>
										<td class="w1">
											工人人数：
										</td>
										<td class="w5">
											<input type="text" name="employeenum"
												value="${currentInfo.employeenum}" class="textstyle" />
										</td>
									</tr>
								</table>

							</div>
							<div class="left2">
								<img src="<%=basepath%>/images/conner/c_01.png" alt="" />
							</div>
							<div class="right2">
								<img src="<%=basepath%>/images/conner/d_01.png" alt="" />
							</div>
						</div>
						<div>
						</div>
						<div class="margin20">
							<div id="message" class="mycolor">
								<c:out value="${ERROR_MESSAGE}"></c:out>
							</div>
						</div>
						<div class="buttonrow">
							<input type="submit" class="buttonok" value="提交" />
							&nbsp;&nbsp;&nbsp;&nbsp;
							<input type="reset" class="buttoncan" value="取消" />
						</div>
					</div>
					<div class="margin20">
					</div>
				</div>
				<div class="margin10">
				</div>
		</form>
	</body>